package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface OrderDetailMapper {
    /**
     * 保存详情信息
     * @param orderDetails
     */
    void addOrderDetails(List<OrderDetail> orderDetails);

    /**
     * 查询订单详细信息
     * @param id
     * @return
     */
    List<OrderDetail> getOrderDetails(Long id);

    /**
     * 获取详细订单信息
     * @param id
     * @return
     */
    List<OrderDetail> getorderDetailById(Long id);

    /**
     * 获取详细订单信息
     * @param id
     * @return
     */
    List<OrderDetail> getById(Long id);

    List<OrderDetail> getTop10Dish(LocalDate begin, LocalDate end);
}
